// 设置最大和最小
@mixin setMaxAndMin($minWidth, $maxWidth) {
  max-width: $maxWidth;
  min-width: $minWidth;
}

// 设置省略
@mixin setTextEllipsis($line: 1) {
  display: -webkit-inline-box;
  max-width: 100%;
  text-overflow: ellipsis;
  overflow: hidden;
  -webkit-line-clamp: $line;
  -webkit-box-orient: vertical;
}

@for $i from 1 through 4 {
  .ellipsis-text-#{$i} {
    @include setTextEllipsis($i);
  }
}

// 公共头像
@mixin commonAvatar() {
  $border-radius: 4px;
  .avatar {
    width: 30px;
    height: 30px;
    border-radius: $border-radius;
  }
}

// 设置没内容进行隐藏
@mixin setEmptyHidden() {
  &:empty {
    display: none;
  }
}

@mixin deleteStatus() {
  position: absolute;
  right: 0;
  top: 0;
  background: url("") no-repeat;
  background-size: 100% 100%;
  width: 55px;
  height: 20px;
}

@mixin scrollbar() {
  &::-webkit-scrollbar {
    height: 20px;
    width: 16px;
    background: #b7d3e0;
  }

  &::-webkit-scrollbar-thumb:vertical {
    border-radius: 0;
    border-style: dashed;
    background-color: #0891b4;
    border-color: transparent;
    border-width: 6px;
    background-clip: padding-box;
  }

  &::-webkit-scrollbar-thumb:vertical:hover {
    border-width: 4px;

    border-radius: 8px;

    border-style: dashed;

    background-color: #0891b4;

    border-color: transparent;

    background-clip: padding-box;
  }

  &::-webkit-scrollbar-thumb:horizontal {
    border-radius: 0;
    border-style: dashed;
    background-color: #0891b4;
    border-color: transparent;
    border-top-width: 7px;
    border-bottom-width: 9px;
    background-clip: padding-box;
  }

  &::-webkit-scrollbar-thumb:horizontal:hover {
    border-top-width: 5px;

    border-bottom-width: 8px;

    border-radius: 8px 8px 10px 10px;

    background-color: #0891b4;
  }

  &::-webkit-scrollbar-button:vertical:start {
    height: 16px;

    width: 16px;

    background-image: url("");

    background-size: auto auto;

    background-repeat: no-repeat;

    background-position: center 5px;

    cursor: pointer;
  }

  &::-webkit-scrollbar-button:vertical:end {
    height: 16px;

    width: 16px;

    background-image: url("");

    background-size: auto auto;

    background-repeat: no-repeat;

    background-position: center 0;

    cursor: pointer;
  }

  &::-webkit-scrollbar-button:horizontal:start {
    height: 16px;

    width: 16px;

    background-image: url("");

    background-size: auto auto;

    background-repeat: no-repeat;

    background-position: center 3px;

    cursor: pointer;
  }

  &::-webkit-scrollbar-button:horizontal:end {
    height: 16px;

    width: 16px;

    background-image: url("");

    background-size: auto auto;

    background-repeat: no-repeat;

    background-position: center 3px;

    cursor: pointer;
  }
}


// 公共滚动条
@mixin scrollbar() {
  &::-webkit-scrollbar {
    height: 20px;

    width: 16px;

    background: #1a415d;
  }

  &::-webkit-scrollbar-thumb:vertical {
    border-radius: 0;

    border-style: dashed;

    background-color: #099cc2;

    border-color: transparent;

    border-width: 6px;

    background-clip: padding-box;
  }

  &::-webkit-scrollbar-thumb:vertical:hover {
    border-width: 4px;

    border-radius: 8px;

    background-color: #099cc2;

    border-style: dashed;

    background-color: #099cc2;

    border-color: transparent;

    background-clip: padding-box;
  }

  &::-webkit-scrollbar-thumb:horizontal {
    border-radius: 0;

    border-style: dashed;

    background-color: #099cc2;

    border-color: transparent;

    border-top-width: 7px;

    border-bottom-width: 9px;

    background-clip: padding-box;
  }

  &::-webkit-scrollbar-thumb:horizontal:hover {
    border-top-width: 5px;

    border-bottom-width: 8px;

    border-radius: 8px 8px 10px 10px;

    background-color: #099cc2;
  }

  &::-webkit-scrollbar-button:vertical:start {
    height: 16px;

    width: 16px;

    background-image: url("");

    background-size: auto auto;

    background-repeat: no-repeat;

    background-position: center 5px;

    cursor: pointer;
  }

  &::-webkit-scrollbar-button:vertical:end {
    height: 16px;

    width: 16px;

    background-image: url("");

    background-size: auto auto;

    background-repeat: no-repeat;

    background-position: center 0;

    cursor: pointer;
  }

  &::-webkit-scrollbar-button:horizontal:start {
    height: 16px;

    width: 16px;

    background-image: url("");

    background-size: auto auto;

    background-repeat: no-repeat;

    background-position: center 3px;

    cursor: pointer;
  }

  &::-webkit-scrollbar-button:horizontal:end {
    height: 16px;

    width: 18px;

    background-image: url("");

    background-size: auto auto;

    background-repeat: no-repeat;

    background-position: center 3px;

    cursor: pointer;
  }
}
